コード例 #1
0
ファイル: HERO_ON_MENU.cs プロジェクト: rnetiks/FoxMod
    private void Start()
    {
        HERO_SETUP component = base.gameObject.GetComponent <HERO_SETUP>();

        HeroCostume.init2();
        component.init();
        component.myCostume = HeroCostume.costume[this.costumeId];
        component.setCharacterComponent();
        this.head       = base.transform.Find("Amarture/Controller_Body/hip/spine/chest/neck/head");
        this.cameraPref = base.transform.Find("Amarture/Controller_Body/hip/spine/chest/shoulder_R/upper_arm_R");
        if (this.costumeId == 9)
        {
            this.cameraOffset = GameObject.Find("MainCamera_Mono").transform.position - this.cameraPref.position;
        }
        if (component.myCostume.sex == SEX.FEMALE)
        {
            base.animation.Play("stand");
            base.animation["stand"].normalizedTime = UnityEngine.Random.Range((float)0f, (float)1f);
        }
        else
        {
            base.animation.Play("stand_levi");
            base.animation["stand_levi"].normalizedTime = UnityEngine.Random.Range((float)0f, (float)1f);
        }
        float num = 0.5f;

        base.animation["stand"].speed      = num;
        base.animation["stand_levi"].speed = num;
    }
コード例 #2
0
    private void Start()
    {
        var component = gameObject.GetComponent <HERO_SETUP>();

        HeroCostume.init2();
        component.init();
        component.myCostume = HeroCostume.costume[costumeId];
        component.setCharacterComponent();
        head       = transform.Find("Amarture/Controller_Body/hip/spine/chest/neck/head");
        cameraPref = transform.Find("Amarture/Controller_Body/hip/spine/chest/shoulder_R/upper_arm_R");
        if (costumeId == 9)
        {
            cameraOffset = GGM.Caching.GameObjectCache.Find("MainCamera_Mono").transform.position - cameraPref.position;
        }

        if (component.myCostume.sex == SEX.FEMALE)
        {
            animation.Play("stand");
            animation["stand"].normalizedTime = Random.Range(0f, 1f);
        }
        else
        {
            animation.Play("stand_levi");
            animation["stand_levi"].normalizedTime = Random.Range(0f, 1f);
        }

        var num = 0.5f;

        animation["stand"].speed      = num;
        animation["stand_levi"].speed = num;
    }
コード例 #3
0
ファイル: HERO_ON_MENU.cs プロジェクト: DeadMemphis/CLRMod
    private void Start()
    {
        HERO_SETUP component = base.gameObject.GetComponent <HERO_SETUP>();

        HeroCostume.init2();
        component.init();
        component.myCostume = HeroCostume.costume[this.costumeId];
        component.setCharacterComponent();
        //  this.mainCameraT = CacheGameObject.Find("MainCamera_Mono").transform;
        this.head       = base.transform.Find("Amarture/Controller_Body/hip/spine/chest/neck/head");
        this.cameraPref = base.transform.Find("Amarture/Controller_Body/hip/spine/chest/shoulder_R/upper_arm_R");
        if (this.costumeId == 9)
        {
            this.cameraOffset = GameObject.Find("MainCamera_Mono").transform.position - this.cameraPref.position;

            ////GameObject gameObject = base.gameObject;
            ////GameObject gameObject2 = CacheGameObject.Find("MenuBackGround");
            ////string[] array = new string[]
            ////{
            ////    "head",
            ////    "hand_L",
            ////    "hand_R",
            ////    "chest",
            ////    "spine",
            ////    "MenuBackGround"
            ////};
            ////foreach (Renderer renderer in gameObject2.GetComponentsInChildren<Renderer>())
            ////{
            ////    GameObject gameObject3;
            ////    if (renderer != null && renderer.enabled && !(gameObject3 = renderer.transform.parent.gameObject).name.EqualTo(false, array) && gameObject3 != gameObject)
            ////    {
            ////        UnityEngine.Object.DestroyImmediate(gameObject3, false);
            ////    }
            ////}
            //this.mainCameraT.position = new Vector3(10.9f, 5841.2f, 3338.3f);
            //this.mainCameraT.rotation = new Quaternion(-0.4f, 0.3f, 0.1f, 0.9f);
            //ThunderPos = this.mainCameraT.position;
            //TitanDiePos = this.mainCameraT.position + Vector3.down * 15f + this.mainCameraT.right * 3.5f;
            ////Camera.main.GetComponent<Skybox>().material = new Material(FengGameManagerMKII.skinCache[4]["NIGHT"]);
            //return;
        }
        if (component.myCostume.sex == SEX.FEMALE)
        {
            base.animation.Play("stand");
            base.animation["stand"].normalizedTime = UnityEngine.Random.Range((float)0f, (float)1f);
        }
        else
        {
            base.animation.Play("stand_levi");
            base.animation["stand_levi"].normalizedTime = UnityEngine.Random.Range((float)0f, (float)1f);
        }
        float num = 0.5f;

        base.animation["stand"].speed      = num;
        base.animation["stand_levi"].speed = num;
        // UnityEngine.Object.Destroy(base.gameObject);
    }
コード例 #4
0
ファイル: TITAN_SETUP.cs プロジェクト: rnetiks/FoxMod
 private void Awake()
 {
     CostumeHair.init();
     CharacterMaterials.init();
     HeroCostume.init2();
     this.hair_go_ref                    = new GameObject();
     this.eye.transform.parent           = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform;
     this.hair_go_ref.transform.position = (Vector3)((this.eye.transform.position + (Vector3.up * 3.5f)) + (base.transform.forward * 5.2f));
     this.hair_go_ref.transform.rotation = this.eye.transform.rotation;
     this.hair_go_ref.transform.RotateAround(this.eye.transform.position, base.transform.right, -20f);
     this.hair_go_ref.transform.localScale = new Vector3(210f, 210f, 210f);
     this.hair_go_ref.transform.parent     = base.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck/head").transform;
 }
コード例 #5
0
    public static void HeroCostumeToPhotonData2(HeroCostume costume, PhotonPlayer player)
    {
        // HACK
        if (costume == null)
        {
            HeroCostume.init2();
            costume = HeroCostume.costume[0];
        }
        Hashtable propertiesToSet = new Hashtable();

        propertiesToSet.Add(PhotonPlayerProperty.sex, SexToInt(costume.sex));
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        int costumeId = costume.costumeId;

        if (costumeId == 0x1a)
        {
            costumeId = 0x19;
        }
        propertiesToSet.Add(PhotonPlayerProperty.costumeId, costumeId);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.heroCostumeId, costume.id);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.cape, costume.cape);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.hairInfo, costume.hairInfo.id);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.eye_texture_id, costume.eye_texture_id);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.beard_texture_id, costume.beard_texture_id);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.glass_texture_id, costume.glass_texture_id);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.skin_color, costume.skin_color);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.hair_color1, costume.hair_color.r);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.hair_color2, costume.hair_color.g);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.hair_color3, costume.hair_color.b);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.division, DivisionToInt(costume.division));
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.statSPD, costume.stat.SPD);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.statGAS, costume.stat.GAS);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.statBLA, costume.stat.BLA);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.statACL, costume.stat.ACL);
        player.SetCustomProperties(propertiesToSet);
        propertiesToSet = new Hashtable();
        propertiesToSet.Add(PhotonPlayerProperty.statSKILL, costume.stat.skillId);
        player.SetCustomProperties(propertiesToSet);
    }