예제 #1
0
    private void Start()
    {
        HERO_SETUP component = base.gameObject.GetComponent <HERO_SETUP>();

        HeroCostume.init();
        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 Awake()
 {
     CostumeHair.init();
     CharacterMaterials.init();
     HeroCostume.init();
     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;
 }