Beispiel #1
0
        public Enemy Init(DefenseGridMap currGridMap)
        {
            this.Tween.Connect("tween_completed", this, nameof(this.TweenActionCompleted));

            this.CurrGridMap      = currGridMap;
            this.CurrGridPosition = currGridMap.SpawnPoint;
            this.Transform        = this.Transform.Translated(
                currGridMap.MapToWorld(CurrGridPosition.X, CurrGridPosition.Y, CurrGridPosition.Z) +
                new Vector3(0f, Height, 0f)
                );

            return(this);
        }
Beispiel #2
0
 public void SetOwnerMap(DefenseGridMap value)
 {
     this.OwnerMap = value;
     this.GetTree().Root.Connect("ready", this, nameof(this.MapReadyHandler));
 }