Beispiel #1
0
    //update unit on fixed schedule before physics - NOT MAIN UPDATE
    void FixedUpdate()
    {
        //Set selection and move if still null

        /*	if (selection == null && move == null && sight == null) {
         *              InitSupportClasses ();
         *      }
         */
        // Check if need to set layer
        if (this.gameObject.layer != defaultLayer)
        {
            selection.SetLayers(defaultLayer);
        }

        //update size of sight sphere
        sight.UpdateSight();

        //check for movement updates, and update tile location
        move.MovementUpdate();
        tileLocation = move.CurrentTile();



        // CALL AFTER ALL OTHER UPDATES//
        //Update Menu

        //update anim
        UpdateAnim();
    }