コード例 #1
0
ファイル: Weapon.cs プロジェクト: WANOBINS/Beatsmith
    void GenerateWholeWeapon()
    {
        foreach (Transform child in transform)
        {
            GameObject.Destroy(child.gameObject);
        }
        type_id      = Random.Range(0, 3);
        MyPrefix     = P_List[Random.Range(0, P_List.Length)];
        MyHandle     = H_List[Random.Range(0, H_List.Length)];
        MyMidSection = M_List[Random.Range(0, M_List.Length)];


        Instantiate(MyHandle, (gameObject.transform.position + MyHandle.OffSet), Quaternion.identity, gameObject.transform);
        Instantiate(MyMidSection, (gameObject.transform.position + MyMidSection.OffSet), Quaternion.identity, gameObject.transform);
        GenerateBlade();


/*
 *      Debug.Log(MyPrefix._prefix + " " + MyMurderPart._prefix);
 *      Debug.Log("ATK " + Total_Stats[0]);
 *      Debug.Log("DEF " + Total_Stats[1]);
 *      Debug.Log("SPD " + Total_Stats[2]);
 *      Debug.Log("DEX " + Total_Stats[3]);
 */
    }
コード例 #2
0
ファイル: Weapon.cs プロジェクト: WANOBINS/Beatsmith
 public void GenerateHandle()
 {
     MyPrefix     = P_List[Random.Range(0, P_List.Length)];
     MyHandle     = H_List[Random.Range(0, H_List.Length)];
     MyMidSection = M_List[Random.Range(0, M_List.Length)];
 }