Example #1
0
        private void Awake()
        {
            var gTiles = mapGrappleable.text;

            gTiles       = Utils.RemoveLineEndings(gTiles);
            grappleTiles = new List <int>();
            unsafeTiles  = new List <int>();
            for (var 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>();

            var trans = transform.Find("Grappler");

            grapHead = trans.gameObject;
            grapLine = grapHead.GetComponent <LineRenderer>();
            grapHead.SetActive(false);
        }
Example #2
0
        private void Start()
        {
            _inRm = GetComponent <InRoom>();

            var go = GameObject.Find("Dray");

            _dray = go.GetComponent <Dray>();
        }
Example #3
0
 private void Start()
 {
     _sword        = transform.Find("Sword").gameObject; // Получить объект меча
     _upgradeSword = transform.Find("Upgrade_Sword").gameObject;
     _dray         = transform.parent.GetComponent <Dray>();
     _sword.SetActive(false);        // Деактивировать меч
     _upgradeSword.SetActive(false); // Деактивировать меч
 }