void Awake() { active = false; col = gameObject.GetComponent<Collider2D> (); platform = transform.FindChild ("Portal").GetComponent<GAFMovieClip> (); mainPart = transform.FindChild ("PortalMainPart").GetComponent<GAFMovieClip> (); }
//инициализация всех используемых модулей public void Awake() { rigid = gameObject.GetComponent<Rigidbody2D> (); groundCheck=transform.FindChild("GroundCheck").gameObject; sight = transform.FindChild ("Sight").gameObject; wallCheck1=transform.FindChild ("WallCheck1").gameObject; wallCheck2=transform.FindChild ("WallCheck2").gameObject; wallCheck3=transform.FindChild ("WallCheck3").gameObject; mov = transform.FindChild("NewHero").GetComponent<GAFMovieClip> (); //controlCol=transform.FindChild ("ControlledCollider").gameObject; //uncontrolCol=transform.FindChild ("UncontrolledCollider").gameObject; lvlController = GameObject.FindGameObjectWithTag (Tags.controller).GetComponent<LevelController> (); returning = false; }
// Use this for initialization void Start() { totoro = GetComponentInChildren <GAFMovieClip>(); SetIdle(); }