// Use this for initialization
 public void Start()
 {
     body = transform.GetComponent<BodyScript> ();
     GetOres ();
     vault = VaultScript.vault;
     //GameObject.FindWithTag ("MainBase").GetComponent<VaultScript>();
 }
示例#2
0
 // Use this for initialization
 void OnEnable()
 {
     miningRange = transform.parent.GetComponent<Missile>().range;
     Debug.Log("Mining Range = "+miningRange);
     vault = VaultScript.vault;
     tower = transform.parent.GetComponent<Missile>().tower;
     GetOres();
     Mine();
     gameObject.SetActive(false);
 }
 // Use this for initialization
 void Start()
 {
     vault = this;
     handler = GameHandler.handler;
     for(int i = 0; i < coffer.Length; i++){
         //coffer[i] = 0;
     }
 }
    // Use this for initialization
    void Start()
    {
        coffer = VaultScript.vault;
        parent = transform.parent;
        ancestor = parent.parent;
        homePos = transform.localPosition;

        menu = parent.GetComponent<ClickMenuScript> ();

        Abilities abilityScript = blueprint.GetComponent<Abilities>();
        foreach(AbilityBook ability in abilityScript.abilityBook){
            if (ability.projectile.name.Contains("Mining")){
                mRng = ability.range;
            }
        }
        //mRng = blueprint.GetComponent<MiningScript> ().miningRange;
        //aRng = blueprint.GetComponent<AttackScript> ().attackRange;
        spheres = GetComponentsInChildren<LineRenderer> ();
    }