// Use this for initialization
 void Start()
 {
     roundManager = GameObject.Find("RoundManager");
     if (roundManager != null)
     {
         roundScript = roundManager.GetComponent<RoundManager> ();
     }
 }
示例#2
0
	// Use this for initialization
	void Start () {
		if (singleton == null) {
			singleton = this;
			DontDestroyOnLoad(gameObject);
		} else {
			DestroyImmediate (gameObject);
			return;
		}
	}
示例#3
0
 void Awake()
 {
     if (Instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }
 public AscendingRight1(AnimationManager animationManager, RoundManager roundManager, AudioManager audioManager)
     : base(animationManager, roundManager, audioManager)
 {
 }
 public FallToFirstLevel(AnimationManager animationManager, RoundManager roundManager, AudioManager audioManager)
     : base(animationManager, roundManager, audioManager)
 {
 }
 void Awake()
 {
     _objects = Resources.LoadAll<GameObject>(_loadPath);
     _randomSpawntime = Random.Range(0, _maxSpawnTime);
     _roundManager = GameObject.Find("Round Manager").GetComponent<RoundManager>();
 }
 public BaseAnimationState(AnimationManager animationManager, RoundManager roundManager, AudioManager audioManager)
 {
     _animationManager = animationManager;
     _roundManager = roundManager;
     _audioManager = audioManager;
 }
 // Use this for initialization
 void Start()
 {
     this.currHp = this.totHp;
     player = (PlayerBehave) Enemy.player.GetComponent<PlayerBehave>();
     roundManager = (RoundManager) GameObject.Find("WaveManagerGO").GetComponent<RoundManager>();
     if (type == Type.Enemy) {
         enemyAttrs = gameObject.GetComponent<Enemy>();
     }
 }
示例#9
0
 //methods
 void Start()
 {
     /*Recipes.instance = new Recipes ();
     Recipes.instance.RecipeStart ();*/
     reputation = 30;
     open_contracts = new ContractBase[6];
     for(int i = 0; i < open_contracts.Length; i++) {
         open_contracts[i] = new ContractBase (1F);
     }
     HeldIngredients = new Dictionary<string, int>();
     foreach (KeyValuePair<string, Ingredients> pair in Recipes.instance.name_ingredient)
     {
         HeldIngredients.Add(pair.Key, 0);
     }
     open_contracts[5] = new GatherQuest();
     GenerateContracts();
     instance = this;
     roundManager = GetComponent<RoundManager>();
 }
 //private int elapsedTime = 0;
 public WinAnimation(AnimationManager animationManager, RoundManager roundManager, AudioManager audioManager)
     : base(animationManager, roundManager, audioManager)
 {
 }
 public AdvanceSecondLevel(AnimationManager animationManager, RoundManager roundManager, AudioManager audioManager)
     : base(animationManager, roundManager, audioManager)
 {
 }
示例#12
0
 protected void Awake()
 {
     Instance = this;
 }