void Awake() { string gTiles = mapGrappleable.text; gTiles = Utils.RemoveLineEndings(gTiles); grappleTiles = new List <int>(); unsafeTiles = new List <int>(); for (int i = 0; i < gTiles.Length; i++) { switch (gTiles[i]) { case 'S': grappleTiles.Add(i); break; case 'X': unsafeTiles.Add(i); break; } } dray = GetComponent <Dray>(); rigid = GetComponent <Rigidbody>(); anim = GetComponent <Animator>(); drayColld = GetComponent <Collider>(); Transform trans = transform.Find("Grappler"); grapHead = trans.gameObject; grapLine = grapHead.GetComponent <LineRenderer>(); grapHead.SetActive(false); }
// Start is called before the first frame update void Start() { sword = transform.Find("Sword").gameObject; dray = transform.parent.GetComponent <Dray>(); sword.SetActive(false); }
// Use this for initialization void Start() { sword = transform.Find("Sword").gameObject; // a dray = transform.parent.GetComponent <Dray>(); // Deactivate the sword sword.SetActive(false); }
// Use this for initialization void Start() { GameObject go = GameObject.Find("Dray"); dray = go.GetComponent <Dray>(); drayColld = go.GetComponent <SphereCollider>(); }
// Update is called once per frame override protected void Update() { base.Update(); if (knockback) { return; } if (Time.time >= timeNextDecision) { DecideDirection(); } //Only move if Dray is in the room GameObject d = GameObject.Find("Dray"); Dray player = (Dray)d.GetComponent(typeof(Dray)); if (player.GetRoomNum() == roomNum) { speed = 2; } else { speed = 0; } //rigid is inherited from Enemy and is initialized in Enemy.Awake() rigid.velocity = directions[facing] * speed; }
private void Start() { sword = transform.Find("Sword").gameObject; dray = transform.parent.GetComponent <Dray>(); // Деактивировать меч sword.SetActive(false); }
private GameObject sword; private Dray dray; void Start() { sword = transform.Find("Sword").gameObject; // a dray = transform.parent.GetComponent <Dray>(); // Deactivate the sword sword.SetActive(false); // b }
// Use this for initialization void Start() { sword = transform.GetChild(0).gameObject; dray = transform.parent.GetComponent <Dray> (); // Deactivate the sword sword.SetActive(false); }
void Start() { inRm = GetComponent <InRoom>(); GameObject go = GameObject.Find("Dray"); dray = go.GetComponent <Dray>(); drayColld = go.GetComponent <SphereCollider>(); dEf = GetComponent <DamageEffect>(); }
void Awake() { dray = GetComponent <Dray>(); rigid = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); drayColld = GetComponent <Collider2D>(); Transform trans = transform.Find("Grappler"); grapHead = trans.gameObject; grapLine = grapHead.GetComponent <LineRenderer>(); grapHead.SetActive(false); }
void Start() { sword = transform.Find("Sword").gameObject; dray = transform.parent.GetComponent <Dray>(); sword.SetActive(false);//did not work as false before, but changed it to true and now it works?? }
public RunForLifeBehaviour(Enemy enemy, Dray dray) { this.enemy = enemy; this.dray = dray; }
public BehaviourController(Enemy enemy, Dray dray) { this.enemy = enemy; this.dray = dray; this.behaviour = new RandomWalkBehaviour(enemy); }
public AttackDrayBehaviour(Enemy enemy, Dray dray) { this.enemy = enemy; this.dray = dray; }