예제 #1
0
파일: Egg.cs 프로젝트: FenGsHt/Tenet
    public Vector2 position; //保存位置信息
    //public int direction;    //1表示正向,0表示反向

    public Egg(int frame, ActionEnum.movement movement, Vector2 position, float parm1, float parm2)
    {
        this.frame    = frame;
        this.movement = movement;
        this.position = position;
        this.parm1    = parm1;
        this.parm2    = parm2;

        // this.direction = direction;
    }
예제 #2
0
    public static void AddFrame(MasterController mController, int frame, ActionEnum.movement movement, Vector2 position, float parm1, float parm2, int tenetDirection)
    {
        //给该目标的时间轴增添事件
        //if ((direction==1&&Master.status == 0 && Master.currentDirection == 1)||
        //    (direction==0&&Master.status==2&&Master.currentDirection==0))
        if (Master.status != 2 && tenetDirection == Master.currentDirection)
        {
            //Debug.Log("addframe");
            //此时可以添加事件帧


            //有些情况下无需条件判断添加frame
            humanBody.AddFrameWithoutConditions(mController, frame, movement, position, parm1, parm2);
        }
    }
예제 #3
0
    public static void AddFrameWithoutConditions(MasterController mController, int frame, ActionEnum.movement movement, Vector2 position, float parm1, float parm2)
    {
        if (movement == ActionEnum.movement.dead)
        {
            //Debug.Log("死亡frame添加");
        }

        Egg egg = new Egg(frame, movement, position, parm1, parm2);

        mController.eggList.Add(egg);   //加入事件帧
    }