コード例 #1
0
        public Goblin(CGPoint position)
            : base(SKTextureAtlas.FromName("Goblin_Idle").TextureNamed("goblin_idle_0001.png"), position)
        {
            MovementSpeed = Velocity * (float)Random.NextDouble();
            SetScale(MinGoblinSize + (float)Random.NextDouble() * GoblinSizeVariance);
            ZPosition = -0.25f;
            Name      = "Enemy";

            // Make it AWARE!
            Intelligence = new ChaseAI(this);
        }
コード例 #2
0
ファイル: Goblin.cs プロジェクト: W3SS/mac-ios-samples
        public Goblin(CGPoint position)
            : base(SKTextureAtlas.FromName ("Goblin_Idle").TextureNamed ("goblin_idle_0001.png"), position)
        {
            MovementSpeed = Velocity * (float)Random.NextDouble ();
            SetScale (MinGoblinSize + (float)Random.NextDouble () * GoblinSizeVariance);
            ZPosition = -0.25f;
            Name = "Enemy";

            // Make it AWARE!
            Intelligence = new ChaseAI (this);
        }
コード例 #3
0
        public Boss(CGPoint position)
            : base(SKTextureAtlas.FromName("Boss_Idle").TextureNamed("boss_idle_0001.png"), position)
        {
            MovementSpeed  = Velocity * 0.35f;
            AnimationSpeed = 1f / 35f;

            ZPosition = -0.25f;
            Name      = "Boss";

            Attacking = false;

            // Make it AWARE!
            var intelligence = new ChaseAI(this);

            intelligence.ChaseRadius    = BossChaseRadius;
            intelligence.MaxAlertRadius = BossChaseRadius * 4f;
            Intelligence = intelligence;
        }