Ejemplo n.º 1
0
    public void Start()
    {
        GameStateManager.OnGameEventChanged += CheckEvent;
        timer = gameObject.AddComponent <ReloadTimer>();
        timer.Setup(timeToExpire, true);

        SetPrefabToCurrentUpgrade();
    }
Ejemplo n.º 2
0
    public void Setup(DamageData data)
    {
        this.damageData = data;
        gameObject.name = "Shooter";

        enemyOnRangeChecker = gameObject.AddComponent <EnemyOnRangeNoCollider>();
        enemyOnRangeChecker.Setup(damageData);
        weapon = gameObject.AddComponent <Weapon>();
        transform.localPosition = Vector3.zero;

        reloadTimer = gameObject.AddComponent <ReloadTimer>();
        reloadTimer.Setup(damageData.reloadTime);
    }
Ejemplo n.º 3
0
    public void Start()
    {
        this.damageData = GetComponentInParent <DamageData>();
        gameObject.name = "Shooter";

        animator = GetComponent <Animator>();

        enemyOnRangeChecker = gameObject.AddComponent <EnemyOnRangeNoCollider>();
        enemyOnRangeChecker.Setup(damageData);
        weapon = gameObject.AddComponent <Weapon>();
        //transform.localPosition = Vector3.zero;

        reloadTimer = gameObject.AddComponent <ReloadTimer>();
        reloadTimer.Setup(damageData.reloadTime);
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     timer = gameObject.AddComponent <ReloadTimer>();
     timer.Setup(timeToExpire);
     timer.Start();
 }
Ejemplo n.º 5
0
 void Start()
 {
     health = GetComponent <Health>();
     timer  = gameObject.AddComponent <ReloadTimer>();
     timer.Setup(health.timeToResuscitate);
 }
Ejemplo n.º 6
0
 void Start()
 {
     health      = GetComponent <Health>();
     reloadTimer = gameObject.AddComponent <ReloadTimer>();
     reloadTimer.Setup(1f);
 }