コード例 #1
0
    private void Play()
    {
        GameObject  prefab      = Instantiate(SkillPrefab, SpawnPoint.position, SpawnPoint.rotation, gameObject.transform);
        PlayerSkill playerskill = prefab.GetComponent <PlayerSkill>();

        playerskill.Controller = this;

        if (playerskill.CanPlay())
        {
            playerskill.Play();
            Fire();
        }
        else
        {
            Destroy(prefab);
        }
    }