Example #1
0
        public void SetTargetInterObject(InterObject IO)
        {
            if (!IO || TargetInterObject == IO)
            {
                return;
            }

            TargetInterObject = IO;
            if (IO.GetInterPosition().x < transform.position.x)
            {
                MoveTargetDirection = Direction.Left;
            }
            else if (IO.GetInterPosition().x > transform.position.x)
            {
                MoveTargetDirection = Direction.Right;
            }
            MoveTargeting = true;
        }
Example #2
0
 public float GetMTX()
 {
     if (TargetInterObject)
     {
         return(TargetInterObject.GetInterPosition().x);
     }
     else
     {
         return(MoveTargetX);
     }
 }