Exemplo n.º 1
0
        public static void CB_COMP_SyncPlayer(GameObject target, ref List <string> log)
        {
            if (!target.GetComponent <SyncPlayer>())
            {
                E_Helpers.AddInspectorTag("OtherPlayer");
                E_Helpers.AddInspectorLayer("OtherPlayer");
                if (log != null)
                {
                    log.Add("Adding SyncPlayer Component to copied player");
                }
                target.AddComponent <SyncPlayer>();
            }

            E_CompHelper.AddCompToPhotonView(target, target.GetComponent <SyncPlayer>());
        }
Exemplo n.º 2
0
 public static void CB_COMP_GenericSync(GameObject target, ref List <string> log)
 {
     if (!target.GetComponent <GenericSync>())
     {
         if (log != null)
         {
             log.Add("Adding GenericSync component.");
         }
         target.AddComponent <GenericSync>();
     }
     if (log != null)
     {
         log.Add("Adding GenericSync -> PhotonView");
     }
     E_CompHelper.AddCompToPhotonView(target, target.GetComponent <GenericSync>());
 }
Exemplo n.º 3
0
        public static void CB_COMP_vMeleeManager(GameObject target, ref List <string> log)
        {
            SHOOTER_HasvShooterManagerComp(target);
            //if (CB_shooterEnabled) return;

            if (!target.GetComponent <vMeleeManager>())
            {
                return;
            }
            if (log != null)
            {
                log.Add("Replacing vMeleeManager -> MP_vMeleeManager");
            }
            if (log != null)
            {
                log.Add("Adding MP_vMeleeManager -> PhotonView");
            }
            E_CompHelper.ReplaceWithComponent(target, typeof(vMeleeManager), typeof(MP_vMeleeManager), false);
        }
Exemplo n.º 4
0
        public static void CB_COMP_vMeleeCombatInput(GameObject target, ref List <string> log)
        {
            if (!target.GetComponent <vMeleeCombatInput>())
            {
                return;
            }
            SHOOTER_HasvShooterManagerComp(target);
            if (CB_shooterEnabled)
            {
                return;
            }

            if (log != null)
            {
                log.Add("Replacing vMeleeCombatInput -> MP_vMeleeCombatInput");
            }
            if (log != null)
            {
                log.Add("Adding MP_vMeleeCombatInput -> PhotonView");
            }
            E_CompHelper.ReplaceWithComponent(target, typeof(vMeleeCombatInput), typeof(MP_vMeleeCombatInput), true);
        }