Added assets from old repo

This commit is contained in:
weedmjac000
2026-01-21 10:30:32 -07:00
parent 44117ec414
commit fc5efd89bf
713 changed files with 148036 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
// Designed by Jacob Weedman
// Part of the "GAMESCRIPTS" required prefab
public class PossiblePositionsSetup : MonoBehaviour
{
public List<GameObject> groundList;
void Awake()
{
//Setup List
groundList = GameObject.FindGameObjectsWithTag("Ground").ToList();
//Iterate through each ground object
foreach (GameObject ground in groundList)
{
float RemainingWidth = ground.transform.localScale.x;
while (RemainingWidth > (-1 * ground.transform.localScale.x))
{
GameObject position;
position = Instantiate(GameObject.Find("PossiblePosition"), new Vector3((ground.transform.position.x + (GameObject.Find("PossiblePosition").transform.localScale.x / 4) - (RemainingWidth / 2)), (ground.transform.position.y + (GameObject.Find("PossiblePosition").transform.localScale.y / 2) + (ground.transform.localScale.y / 2)), ground.transform.position.z), ground.transform.rotation);
position.transform.parent = ground.transform;
RemainingWidth -= GameObject.Find("PossiblePosition").transform.localScale.x * 2;
}
}
}
}