using UnityEngine;
using System.Collections;
public class tianguangkongzhi2 : MonoBehaviour
{
private GameObject Prefab_Sun;
private float CreactSunPosY;
private float createSunMaxPosX = 6;
private float createSunMinPosX = -6F;
private float SunDownMaxPosY = 3F;
private float SunDownMinPosY = -6F;
// Use this for initialization
void Start ()
{
Prefab_Sun = Resources.Load<GameObject> ("Sun");
InvokeRepeating ("CreateSun", 3, 3);
}
void Update ()
{
}
void CreateSun()
{
GameObject.Instantiate<GameObject>(Prefab_Sun,Vector3.zero,Quaternion.identity,transform);
}
}
using System.Collections;
public class tianguangkongzhi2 : MonoBehaviour
{
private GameObject Prefab_Sun;
private float CreactSunPosY;
private float createSunMaxPosX = 6;
private float createSunMinPosX = -6F;
private float SunDownMaxPosY = 3F;
private float SunDownMinPosY = -6F;
// Use this for initialization
void Start ()
{
Prefab_Sun = Resources.Load<GameObject> ("Sun");
InvokeRepeating ("CreateSun", 3, 3);
}
void Update ()
{
}
void CreateSun()
{
GameObject.Instantiate<GameObject>(Prefab_Sun,Vector3.zero,Quaternion.identity,transform);
}
}