示例#1
0
        public bool IsFriendlyTowards(BasePlayer player)
        {
            if (player == null)
            return false;

             if (player == this)
            return true;

             return false;
        }
示例#2
0
        public bool IsHostileTowards(BasePlayer player)
        {
            if (player == null)
            return false;

             if (player != this)
            return true;

             return false;
        }
示例#3
0
        public bool IsNeutralTowards(BasePlayer player)
        {
            if (player == null)
            return true;

             return false;
        }
示例#4
0
文件: Map.cs 项目: CAMongrel/WinWar
        internal bool CreateEntity(int x, int y, LevelObjectType entityType, BasePlayer owner)
        {
            Log.Write(LogType.Generic, LogSeverity.Debug, "Pathfinder at [" + x + "," + y + "]: " + Pathfinder[x, y]);
             Log.Write(LogType.Generic, LogSeverity.Debug, "levelPassable at [" + x + "," + y + "]: " + levelPassable.passableData[x, y]);
             if (Pathfinder[x, y] != 0)
            return false;

             Entity newEnt = Entity.CreateEntityFromType (entityType, this);
             newEnt.SetPosition (x, y);
             entities.Add (newEnt);

             if (owner != null)
            // Neutral entities may not have an owner
            owner.ClaimeOwnership (newEnt);

             newEnt.DidSpawn ();

             // Add to Pathfinder
             Pathfinder.SetFieldsBlocked(x, y, newEnt.TileSizeX, newEnt.TileSizeY);

             return true;
        }