Beispiel #1
0
    public void Initialize(ITarget target, MissileShooter missileShooter)
    {
        this.target         = target;
        this.missileShooter = missileShooter;
        var t = transform;

        this.initialPosition = t.position;
        this.initialRotation = t.rotation;
        t.SetPositionAndRotation(initialPosition, initialRotation);
        this.moveUnit.Initialize(initialPosition);

        this.color = GetComponent <Renderer>().material.color;
    }
Beispiel #2
0
 private void MissileShooterInitialize()
 {
     _missileShooter = Instantiate(Resources.Load("Prefabs/MissileShooter") as GameObject).GetComponent <MissileShooter>();
     _missileShooter.Initialize();
 }