コード例 #1
0
ファイル: AIPathConditions.cs プロジェクト: 741645596/batgame
 private static void SetSelfPathFlag(Life life, AIEventData data)
 {
     if (life == null)
     {
         return;
     }
     if (life is Role)
     {
         Role        w = life as Role;
         RoleGridRun m = w.run;
         if (m != null)
         {
             m.SetUpdataPath(data);
         }
     }
     if (life is Pet)
     {
         Pet w = life as Pet;
         if (w.PetMoveAI != null && w.PetMoveAI is PetWalk1002)
         {
             PetGridRun m = (w.PetMoveAI as PetWalk1002).m_run;
             m.SetUpdataPath(data);
         }
     }
 }
コード例 #2
0
ファイル: PetWalk1002.cs プロジェクト: 741645596/batgame
    // Use this for initialization

    public override void Init(Pet pet)
    {
        base.Init(pet);

        m_run = new PetGridRun(m_Owner);
        GameObject posgo = m_Owner.m_Parent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.petFollowPos);

        if (posgo != null)
        {
            m_vFollowPos = posgo.transform.position;
        }
    }