void Start() { rb2d = GetComponent <Rigidbody2D>(); //AOVsRenderer = AreaOfVision.GetComponent<SpriteRenderer>(); Player = GameObject.Find("Player"); // CALCULATE FIRST IDLE MOVEMENT NewIdleMovement(); //CALCULATE NEXT IDLE MOVEMENT if (Time.time - lastDirectionChangeTime > directionChangeTime) { lastDirectionChangeTime = Time.time; NewIdleMovement(); } DropingSoul = gameObject.AddComponent <DropSouls>(); bulletObject = weaponUsing.Bullet; // GET ANIMATOR COMPONENTS feetAnimator = Feet.GetComponent <Animator>(); walkingParamID = Animator.StringToHash("Walking"); GraphicSprite = Graphic.GetComponent <SpriteRenderer>(); FeetSprite = Feet.GetComponent <SpriteRenderer>(); //CHANGE COLOR ChangeColor(); }
//private Component ArrTest; //private MonoBehaviour Test; //private GameObject Gol; void Start() { rb2d = GetComponent <Rigidbody2D>(); //AOVsRenderer = AreaOfVision.GetComponent<SpriteRenderer>(); Player = GameObject.Find("Player"); // CALCULATE FIRST IDLE MOVEMENT NewIdleMovement(); DropingSoul = gameObject.AddComponent <DropSouls>(); // GET ANIMATOR COMPONENTS feetAnimator = Feet.GetComponent <Animator>(); walkingParamID = Animator.StringToHash("Walking"); GraphicSprite = Graphic.GetComponent <SpriteRenderer>(); FeetSprite = Feet.GetComponent <SpriteRenderer>(); //CHANGE COLOR ChangeColor(); }