Esempio n. 1
0
    public override Behaviour MakeComponent(GameObject gameObject)
    {
        TeleportComponent component = gameObject.AddComponent <TeleportComponent>();

        component.target = target;
        component.origin = origin;
        return(component);
    }
 private void Start()
 {
     // Get components for moving and teleporting
     PMC = PlayerGameObject.GetComponent <MovementComponent>();
     PTC = PlayerGameObject.GetComponent <TeleportComponent>();
     // bind Command to Class
     buttonW     = new MoveForward(PMC);
     buttonS     = new MoveBackwards(PMC);
     buttonShift = new Teleport(PTC);
     nothing     = new DoNothing(PMC);
 }
Esempio n. 3
0
 public Teleport(TeleportComponent tc)
 {
     this.tc = tc;
 }