Ejemplo n.º 1
0
    public void ActivateSkill(Block aimBlock, CombineModel.Skills skill, int skillLevel)
    {
        CellState cs = aimBlock.State.CombinationResult(skill, skillLevel);

        if (cs)
        {
            aimBlock.photonView.RPC("RpcChangeOwner", PhotonTargets.All, new object[] { PhotonNetwork.player });
            aimBlock.photonView.RPC("RpcChangeState", PhotonTargets.All, new object[] { DefaultResourcesManager.AllStatesList.States.IndexOf(cs) });
        }
    }
Ejemplo n.º 2
0
    public void Mutate(Block block, CombineModel.Skills evolveType, int evolveLevel)
    {
        CellState cs = block.State.CombinationResult(evolveType, evolveLevel);

        if (cs)
        {
            ChangeState(block, cs);
            ChangeOwner(block, PhotonNetwork.player);
        }
    }
Ejemplo n.º 3
0
 public bool HasCombination(CombineModel.Skills skill)
 {
     foreach (Combination comb in Combinations)
     {
         if (comb.skill == skill)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
 public CellState CombinationResult(CombineModel.Skills skill, int skillLevel = 0)
 {
     foreach (Combination comb in Combinations)
     {
         if (comb.skill == skill && skillLevel == comb.skillLevel)
         {
             return(comb.ResultState);
         }
     }
     return(null);
 }