Beispiel #1
0
        public int GetLayerByMechaCamp(MechaCamp camp)
        {
            switch (camp)
            {
            case MechaCamp.None:
            {
                return(0);
            }

            case MechaCamp.Friend:
            {
                return(Layer_ComponentHitBox_Player);
            }

            case MechaCamp.Player:
            {
                return(Layer_ComponentHitBox_Player);
            }

            case MechaCamp.Enemy:
            {
                return(Layer_ComponentHitBox_Enemy);
            }
            }

            return(0);
        }
Beispiel #2
0
 public MechaInfo(string mechaName, MechaCamp mechaCamp, MechaConfig mechaConfig)
 {
     GUID        = GetGUID();
     MechaName   = mechaName;
     MechaCamp   = mechaCamp;
     MechaConfig = mechaConfig;
 }
        public static MechaInfo GetMechaInfo(this MechaConfig mechaConfig, MechaCamp mechaCamp)
        {
            MechaInfo mechaInfo = new MechaInfo(mechaConfig.MechaConfigName, mechaCamp, mechaConfig.Clone());

            foreach (MechaConfig.Config config in mechaConfig.MechaComponentList)
            {
                MechaComponentConfig mcc      = ConfigManager.Instance.GetMechaComponentConfig(config.MechaComponentKey);
                MechaComponentInfo   mci      = new MechaComponentInfo(mcc, config.MechaComponentQuality, config.MechaComponentAlias);
                GridPosR             finalGPR = config.GridPosR + ConfigManager.EDIT_AREA_HALF_SIZE * GridPosR.One;
                mechaInfo.AddMechaComponentInfo(mci, finalGPR);
            }

            return(mechaInfo);
        }
Beispiel #4
0
 public bool IsFriend(MechaCamp targetMechaCamp)
 {
     if (MechaCamp == targetMechaCamp)
     {
         return(true);
     }
     if (targetMechaCamp == MechaCamp.Friend && MechaCamp == MechaCamp.Player)
     {
         return(true);
     }
     if (MechaCamp == MechaCamp.Friend && targetMechaCamp == MechaCamp.Player)
     {
         return(true);
     }
     return(false);
 }
Beispiel #5
0
 public bool IsOpponent(MechaCamp targetMechaCamp)
 {
     if (targetMechaCamp == MechaCamp.Player && MechaCamp == MechaCamp.Enemy)
     {
         return(true);
     }
     if (MechaCamp == MechaCamp.Player && targetMechaCamp == MechaCamp.Enemy)
     {
         return(true);
     }
     if (targetMechaCamp == MechaCamp.Friend && MechaCamp == MechaCamp.Enemy)
     {
         return(true);
     }
     if (MechaCamp == MechaCamp.Friend && targetMechaCamp == MechaCamp.Enemy)
     {
         return(true);
     }
     return(false);
 }