Example #1
0
 public override void Awake()
 {
     this.alias      = this.alias.SetDefault("Transform");
     this.autoRename = false;
     base.Awake();
     this.rotation.Setup("Rotation", this);
     this.position.Setup("Position", this);
     this.scale.Setup("Scale", this);
     this.directionUp.Setup("Direction/Up", this);
     this.directionDown.Setup("Direction/Down", this);
     this.directionLeft.Setup("Direction/Left", this);
     this.directionRight.Setup("Direction/Right", this);
     this.directionForward.Setup("Direction/Forward", this);
     this.directionBack.Setup("Direction/Back", this);
     this.position.getMethod         = () => this.transform.position;
     this.position.setMethod         = value => this.transform.position = value;
     this.rotation.getMethod         = () => this.transform.eulerAngles;
     this.rotation.setMethod         = value => this.transform.eulerAngles = value;
     this.scale.getMethod            = () => this.transform.localScale;
     this.scale.setMethod            = value => this.transform.localScale = value;
     this.directionUp.getMethod      = () => this.transform.rotation * Vector3.up;
     this.directionDown.getMethod    = () => this.transform.rotation * Vector3.down;
     this.directionLeft.getMethod    = () => this.transform.rotation * Vector3.left;
     this.directionRight.getMethod   = () => this.transform.rotation * Vector3.right;
     this.directionForward.getMethod = () => this.transform.rotation * Vector3.forward;
     this.directionBack.getMethod    = () => this.transform.rotation * Vector3.back;
 }
 public override void Awake()
 {
     this.alias      = this.alias.SetDefault("Transform");
     this.autoRename = false;
     base.Awake();
     this.position.Setup("Position", this);
     this.position.getMethod = () => this.transform.position;
     this.position.setMethod = value => this.transform.position = value;
 }
Example #3
0
        public override void Use()
        {
            base.Use();
            Vector3 amount = this.amount;

            amount *= this.GetTimeOffset();
            foreach (GameObject target in this.target)
            {
                target.transform.localEulerAngles += amount;
            }
        }
Example #4
0
 public override void Use()
 {
     base.Use();
     foreach (GameObject target in this.target)
     {
         Vector3 amount = this.amount;
         if (this.type == MoveType.Relative)
         {
             amount = target.transform.Localize(amount);
         }
         target.CallEvent(this.eventName, amount);
     }
 }